package org.softmed.ATComm.swingClient;

import java.awt.Dimension;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class StatusPanel extends JPanel {

	int width = 450;
	int height = 25;
	JLabel status = new JLabel();

	public StatusPanel() {
		setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
		add(new JLabel("Status :  "));

		status.setMaximumSize(new Dimension(width, height));
		status.setMinimumSize(new Dimension(width, height));
		status.setPreferredSize(new Dimension(width, height));

		add(status);

		add(Box.createHorizontalGlue());
	}

	public void setStatus(String message) {
		status.setText(message);
		revalidate();
		repaint();
	}

}
